package com.jic.interaction.weCashier.service;

import com.jic.interaction.weCashier.model.entity.PasswordFactor;
import com.jic.interaction.weCashier.model.entity.PaymentResult;
import com.jic.interaction.weCashier.model.entity.PaymentSubmission;
import com.jic.interaction.weCashier.model.entity.PreOrder;
import com.jic.interaction.weCashier.model.entity.Refund;
import com.jic.interaction.weCashier.model.entity.SelectPreOrder;
import com.jic.interaction.weCashier.model.entity.SelectRefund;
import com.jic.interaction.weCashier.model.vo.response.PasswordFactorResponse;
import com.jic.interaction.weCashier.model.vo.response.PaymentResultResponse;
import com.jic.interaction.weCashier.model.vo.response.PaymentSubmissionResponse;
import com.jic.interaction.weCashier.model.vo.response.PreOrderResponse;
import com.jic.interaction.weCashier.model.vo.response.RefundResponse;
import com.jic.interaction.weCashier.model.vo.response.SelectPreOrderResponse;
import com.jic.interaction.weCashier.model.vo.response.SelectRefundResponse;

import java.io.IOException;
import java.util.concurrent.ExecutionException;

/**
 * @Auther YGH
 * @DATE 2020/11/11/13:43
 */
public interface PaymentSubmissionService {
    /**
     * 下单提交接口
     * @param paymentSubmission
     * @return 订单号
     */
    PaymentSubmissionResponse addPlaceAnOrder(PaymentSubmission paymentSubmission);



    /**
     * 获取支付结果
     * @param paymentResult
     * @return
     */
    PaymentResultResponse getOrderCheck(PaymentResult paymentResult) throws InterruptedException, ExecutionException, IOException;

    /**
     * 退款
     * @param refund
     * @return
     */
    RefundResponse deleteOrder(Refund refund) throws InterruptedException, ExecutionException, IOException;

    /**
     * 获取密码因子
     * @param passwordFactor
     * @return
     */
    PasswordFactorResponse getPassWord(PasswordFactor passwordFactor);

    /**
     * 退款查询
     * @param selectRefund
     * @return
     */
    SelectRefundResponse selectRefund(SelectRefund selectRefund);

    /**
     * 预下单
     * @param preOrder
     * @return
     */
    PreOrderResponse insertPreOrder(PreOrder preOrder);

    /**
     * 预下单查询
     * @param selectPreOrder
     * @return
     */
    SelectPreOrderResponse selectPreOrder(SelectPreOrder selectPreOrder);
}
